package com.xingkeduo.business.transformation.json;

import com.fasterxml.jackson.databind.node.ObjectNode;
import com.xingkeduo.pojo.dto.UserDTO;
import com.xingkeduo.util.pojo.base.BaseJson;

/**
 * @Description:
 * @Author:gaozifeng
 * @Date 2019/5/7 21:56
 **/
public class UserDTOJTO extends BaseJson {

    /**
     * 返回发型师的
     *
     * @param table:
     * @return : com.fasterxml.jackson.databind.node.ObjectNode
     * @author : gaozifeng
     * @date : 2019/5/8 14:17
     */
    public static ObjectNode toJson(UserDTO table) throws Throwable {
        ObjectNode root = MAPPER.createObjectNode();
        if (table != null) {
            root.put("id", table.getId());
            root.put("name", table.getName());
            root.put("path", table.getPath());
            root.put("signaTure", table.getSignaTure());
        }
        return root;
    }

}
